﻿using System.Collections.Generic;
using SlickGridNet;
using SlickGridNet.Serialization;

namespace Slick.Formatters
{
	public class DropDownListFormatter : SlickFormatter, ISelfRealize
	{
		/// <summary>
		/// should return JavaScript code
		/// </summary>
		/// <returns></returns>
		public string GetCode()
		{
			return @"(function($) {
						$.extend(true, window, {
							'Slick': {
								'Formatters': {
									'DropDownList': DropDownListFormatter
								}
							}
						});
					})(jQuery);";
		}

		/// <summary>
		/// here you can include scripts for self realize objects
		/// </summary>
		/// <param name="scripts">collection of scripts to include</param>
		public void IncludeScripts(ResourcesCollection scripts)
		{
			scripts.Add("~/Scripts/SlickGridExt/Formatters/slick.formatters.dropdownlist.js");
		}

		/// <summary>
		/// here you can include scripts for self realize objects
		/// </summary>
		/// <param name="stylesheets">collection of stylesheets to include</param>
		public void IncludeStylesheets(ResourcesCollection stylesheets)
		{
		}
	}
}